package com.mysoft.gfyx.marketdevelop.controller.common;

import com.mysoft.framework.rpc.annotation.PubAction;
import com.mysoft.framework.rpc.annotation.PubService;
import com.mysoft.framework.rpc.contants.RequestPrefix;
import com.mysoft.gfyx.marketdevelop.controller.dto.common.UpdateOpptyStatusRequestDto;
import com.mysoft.gfyx.marketdevelop.service.CommonService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMethod;

import javax.annotation.Resource;

@PubService(value = "/opptyStatusPub", prefix = RequestPrefix.PUB)
@Tag(name = "商机数据状态-PUB")
public class OpptyStatusPubController {
    @Resource
    private CommonService commonService;

    // 获取合作单位列表
    @PubAction(value = "/updateOpptyStatus", method = RequestMethod.POST)
    public boolean updateOpptyStatus(@RequestBody UpdateOpptyStatusRequestDto dto) {
        return commonService.updateOpptyStatus(dto.getDataSource(), dto.getDataSourceId(), dto.getStatus());
    }
}
